package com.example.pattern.singleton;

public class HungryStaticSingleton {

    private static final HungryStaticSingleton singleton;

    //静态代码块机制
    static {
        singleton = new HungryStaticSingleton();
    }

    private HungryStaticSingleton() {
    }

    public static HungryStaticSingleton getSingleton() {
        return singleton;
    }
}
